#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

// This test checks the Council Room card (card enum 8)
int main()
{
	int k[10] = {council_room, gardens, embargo, village, minion, mine, cutpurse, sea_hag, tribute, smithy};
	struct gameState G;
	int randomSeed;
	int m;
	int numPlayer = 3;
	
	srand(time(NULL));
	randomSeed = (rand() % 10)+1;

	m = initializeGame(numPlayer, k, randomSeed, &G);
	
	G.handCount[0] = 1;
	G.numBuys = 1;
	G.hand[0][1] = 8;
	G.handCount[1] = 50;
	G.handCount[2] = 0;
	councilRoom(0, &G, 0);
	
	printf("Player zero hand expected: 4. Actual: %i. ", G.handCount[0]);
	if(G.handCount[0] == 4)
		printf("PASSED.\n");
	else
		printf("FAILED.\n");
	printf("Player one hand expected: 51. Actual: %i. ", G.handCount[1]);
	if(G.handCount[1] == 51)
		printf("PASSED.\n");
	else
		printf("FAILED.\n");
	printf("Player two hand expected: 1. Actual: %i. ", G.handCount[2]);
	if(G.handCount[2] == 1)
		printf("PASSED.\n");
	else
		printf("FAILED.\n");
	printf("Number of buys expected: 2. Actual: %i ", G.numBuys);
	if(G.numBuys == 2)
		printf("PASSED.\n");
	else
		printf("FAILED.\n");
	
	
	
	
	return 0;
}